<include file="Public/head"/>
<script src="{:get_style_cdnurl()}paimai/yunying/js/city.js" type="text/javascript"></script>
<link type="text/css" rel="stylesheet" href="{:get_style_cdnurl()}paimai/yunying/css/cashier.css"/>
<style type="text/css">

</style>
</head>
<include file="Public/common_header"/>
<div class="mian">
    <include file="Public/sidebar" menu='zhgl.grzh'/>
    <div class="mianR">
        <div class="yuyue">
            <ul>
                <li data-id="0" class="yuCurrent">基本信息</li>
                <li data-id="1">成长值</li>
                <li data-id="2">积分</li>
                <li data-id="3">钱包</li>
                <li data-id="4">爱车</li>
            </ul>
        </div>
        <div class="live-seach" style="display: none;">
            <ul class="clearfix receivables">
                <li>
                    <input type="text" name="start_time" placeholder="开始时间" value="" class="xiaci1 xin-text"
                           id="start_time" readonly>
                </li>
                <li>
                    <input type="text" name="end_time" placeholder="结束时间" value="" class="xiaci1 xin-text" id="end_time"
                           readonly/>
                </li>
                <li class="collection">
                    <input type="button" onclick="user_search($('#status').val())" value="搜索">
                </li>
            </ul>
        </div>
        <div class='listBox'>
            <div class="yuList">
                <div class="account-text">
                    <dl>
                        <dt>
                            <if condition="$clcw_user_info.avatar eq ''">
                                <img src="{:get_style_cdnurl()}paimai/yunying/images/carded_ico.jpg"/>
                                <else/>
                                <img src="{$clcw_user_info.avatar}"/>
                            </if>
                        </dt>
                        <dd>
                            <table class="receivables-cont">
                                <tbody>
                                <tr>
                                    <td>个人ID</td>
                                    <td>{$clcw_user_info.user_id}</td>
                                </tr>
                                <tr>
                                    <td>姓名</td>
                                    <td>{$clcw_user_info.real_name}</td>
                                </tr>
                                <tr>
                                    <td>牛人</td>
                                    <td>{$clcw_user_info.is_expert_name}</td>
                                </tr>
                                <if condition="$clcw_user_info.is_expert eq 1">
                                    <tr>
                                        <td>设置牛人时间</td>
                                        <td>{$clcw_user_info.change_expert_time}</td>
                                    </tr>
                                </if>
                                <tr>
                                    <td>用户等级</td>
                                    <td>{$clcw_user_info.user_level}</td>
                                </tr>
                                <tr>
                                    <td>等级变更时间</td>
                                    <td>{$clcw_user_info.change_level_time}</td>
                                </tr>
                                <tr>
                                    <td>手机号</td>
                                    <td>{$clcw_user_info.mobile}</td>
                                </tr>
                                <if condition="$clcw_user_info.is_expert eq 1">
                                    <tr>
                                        <td>擅长品牌</td>
                                        <td>{$clcw_user_info.good_brand}</td>
                                    </tr>
                                    <tr>
                                        <td>擅长类型</td>
                                        <td>{$clcw_user_info.good_category}</td>
                                    </tr>
                                </if>
                                <tr>
                                    <td>创建时间</td>
                                    <td>{$clcw_user_info.create_time}</td>
                                </tr>
                                </tbody>
                            </table>
                        </dd>
                    </dl>
                    <if condition="$clcw_user_info.is_expert eq 1">
                        <div class="expert-introduction">
                            <span>牛人介绍</span>
                            <p>{$clcw_user_info.user_intro}</p>
                        </div>
                    </if>
                </div>
            </div>
            <div class='yuList' style='display:none'>
                <div class="growth-value">
                    <div class="xinxi-conter clearfix">
                        <h4 class="order_no">总成长值：<b>{$clcw_user_info.user_exp}</b></h4>
                    </div>
                </div>
                <div id="growth-list"></div>
            </div>
            <div class='yuList' style='display:none'>
                <div class="growth-value">
                    <div class="xinxi-conter clearfix">
                        <h4 class="order_no">总积分：<b>{$clcw_user_info.user_score}</b></h4>
                    </div>
                </div>
                <div id="score-list"></div>
            </div>
            <div class='yuList' style='display:none'>
                <div class="growth-value">
                    <div class="xinxi-conter clearfix">
                        <h4 class="order_no">总金额：<b>{$clcw_user_info.user_money|default=0}</b></h4>
                    </div>
                </div>
                <div id="wallet-list"></div>
            </div>
            <div class='yuList' style='display:none'>
                <div class="car-list-cont clearfix">
                    <empty name="my_car_list">
                        您还没有添加爱车！
                        <else/>
                        <volist name="my_car_list" id="mcl" key="k">
                            <dl>
                                <dt>爱车{$k}</dt>
                                <dd>
                                    <ul>
                                        <li><span>归属城市：</span>{$mcl.location_area}</li>
                                        <li><span>发动机号：</span>{$mcl.engine_number}</li>
                                        <li><span>车牌号码：</span>{$mcl.plate_number}</li>
                                        <li><span>车架号：</span>{$mcl.frame_number}</li>
                                    </ul>
                                </dd>
                            </dl>
                        </volist>
                    </empty>
                </div>
            </div>
        </div>
        <div class="yongBtn" style='width:170px;'>
            <input type="hidden" name="status" id="status" value=""/>
            <input type="button" class="quxiao" onclick="window.close()" value="关闭"/>
        </div>
    </div>
</div>
</div>

<div class="clear"></div>
</div>
<script type="text/javascript">
    $(function () {
        $(".yuyue ul li").click(function () {
            $(".live-seach").show();
            clear_form_params();
            var status = $(this).attr('data-id');
            $("#status").val(status);
            get_list(status);
        });
        $(".yuyue ul li:first-child,.yuyue ul li:last-child").click(function () {
            $(".live-seach").hide();
        });

        $("#start_time").ymdateplugin({});
        $("#end_time").ymdateplugin({});
    });
    //获取url中的参数
    function getUrlParam(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
        var r = window.location.search.substr(1).match(reg);  //匹配目标参数
        if (r != null)
            return unescape(r[2]);
        return null; //返回参数值
    }
    function get_list(t) {
        var url = mkUrl();
        var p = getUrlParam('p');
        if (p != null) {
            var purl = "?p=" + p;
        } else {
            var purl = "?p=1";
        }
        var action = '';
        var listBox = '';
        if (t == 1) {
            action = '/ClcwUser/userGrowthList';
            listBox = "growth-list";
        } else if (t == 2) {
            action = '/ClcwUser/userScoreList';
            listBox = "score-list";
        } else if (t == 3) {
            action = '/ClcwUser/userWalletList';
            listBox = "wallet-list";
        }
        $.get(action + purl, url, function (data) {
            $("#" + listBox).html(data);
        }, "html");
    }
    function user_search(t) {
        get_list(t);
    }
    function get_page(p) {
        var url = mkUrl();
        var t = $('#status').val();
        var action = '';
        var listBox = '';
        if (t == 1) {
            action = '/ClcwUser/userGrowthList';
            listBox = "growth-list";
        } else if (t == 2) {
            action = '/ClcwUser/userScoreList';
            listBox = "score-list";
        } else if (t == 3) {
            action = '/ClcwUser/userWalletList';
            listBox = "wallet-list";
        }
        $.get(action + encodeURI("/p/" + p), url, function (data) {
            $("#" + listBox).html(data);
        }, "html");
    }
    function mkUrl() {
        var url = "";
        var uid = "{$clcw_user_info.user_id}"
        var start_time = $("input[name='start_time']").val();
        var end_time = $("input[name='end_time']").val();
        if (uid) {
            url += '&uid=' + uid;
        }
        if (start_time) {
            url += '&start_time=' + start_time;
        }
        if (end_time) {
            url += '&end_time=' + end_time;
        }
        return url;
    }
    function clear_form_params() {
        $(':input').not(':button, :submit, :reset, :hidden, select').val('');
    }
</script>
<include file="Public/foot"/>